#include "FlyBird.h"
#include "GameIO.h"

SDL_Surface* FlyBird :: birdImg[BIRDTYPE_NUM];

SDL_Surface* FlyBird ::getBirdImg(int n)
{
	if(n < BIRDTYPE_NUM)
		return birdImg[n];

	return NULL;
}

void FlyBird :: loadBirdImg()
{
	string imgPath;

	for(int i = 0; i < BIRDTYPE_NUM; i++)
	{
		imgPath = "pics\\bird" + GameIO :: conToStr(i) + ".bmp";
		birdImg[i] = GameIO :: loadImg(imgPath);
		SDL_SetColorKey(birdImg[i], SDL_RLEACCEL|SDL_SRCCOLORKEY, SDL_MapRGB(birdImg[i]->format, 250, 250, 250));
	}
}